<template>
  <el-row style="height:60px" type="flex" justify="end" align="middle">
    <el-pagination
      layout="total, prev, pager, next"
      :total="total"
      :current-page="queryParams.page"
      :page-size="queryParams.pagesize"
      @current-change="handleCurrentChange"
    />
  </el-row>
</template>

<script>

export default ({
  props: {
    queryParams: {
      type: Object,
      required: true
    },
    total: {
      type: Number,
      required: true
    }
  },
  data() {
    return {
    }
  },
  methods: {
    handleCurrentChange(current) {
      console.log(current)
      this.queryParams.page = current
      // 更新员工列表
      this.$emit('getEmployeeList')
    }
  }
})
</script>

<style scoped>

</style>
